<template>
	<view class="contain qxlj_back4">
		<view class="park_item qxlj_back2" v-for="(item,index) in goodsList" :key="index" @click="goDeatil(item)">
			<view class="right">
				<image :src="item.Img" mode=""></image>
			</view>
			<view class="left">
				<view class="one">{{item.Name}}</view>
				<view class="km_box qxlj_color">￥<text class="price">{{parseInt(item.ShowPrice)}}</text><text class="end">起</text>
				</view>
				<!-- <view class="two" v-if="item.Mobile">已售：{{item.Mobile}}</view> -->
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getGoodsList,
	} from '@/api/mall.js'
	export default {
		data() {
			return {
				goodsList: [],
			}
		},
		onLoad(option) {
			this.loadData();
		},
		methods: {
			goDeatil(item) {
				uni.navigateTo({
					url: `/mall_subpages/activitiesList/admissionTicketDetail?id=${item.Id}&type=${item.Type}`
				})
			},
			//获取列表数据
			async loadData() {
				try {
					const {
						Data
					} = await getGoodsList({
						TypeId: 11,
					})
					console.log(Data)
					this.goodsList = Data;
				} catch (e) {
					this.loadingType = 'nomore'
					//TODO handle the exception
				}
			},
		},
	}
</script>

<style scoped lang="scss">
	page {
		background-color: #fff;
	}

	.contain {
		width: 100%;
		min-height: 100vh;
		padding: 4%;
		padding-top: 2%;
	}

	.park_item {
		width: 100%;
		height: 200rpx;
		border-radius: 2%;
		display: flex;
		justify-content: space-between;
		padding: 3% 2%;
		margin-top: 2%;

		.left {
			width: 65%;
			position: relative;

			.one {
				color: #1A1A1A;
				font-size: 32rpx;
			}

			.two {
				color: #999999;
				// height: 60rpx;
				margin-top: 2%;
				font-size: 24rpx;
			}

			.three {
				font-size: 24rpx;
				color: #999999;
				margin-top: 2%;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}

			.km_box {
				font-size: 28rpx;
				position: absolute;
				bottom: 1%;
				left: 0;

				.price {
					font-size: 40rpx;
					font-weight: bold;
				}

				.end {
					color: #999999;
				}
			}
		}

		.right {
			width: 30%;
			height: 100%;

			image {
				width: 100%;
				height: 100%;
				border-radius: 7px;
			}
		}

	}
</style>